Closed Bug 1868293 Opened 1 years ago Closed 1 year ago

fix clippy warnings in glean/api/src/ffi/event.rs

Categories

(Developer Infrastructure :: Lint and Formatting, task)

Tracking

(firefox126 fixed)

RESOLVED FIXED
Tracking Status
firefox126 --- fixed

People

(Reporter: Sylvestre, Assigned: tannal2409, Mentored)

References

(Blocks 1 open bug)

Details

(Keywords: good-first-bug, Whiteboard: [lang=rust])

Attachments

(2 files, 2 obsolete files)

Filling as a good first bug to learn workflows.

toolkit/components/glean/api/src/ffi/event.rs:
   61:10  warning  unneeded `return` statement                              clippy::needless_r
eturn (clippy)

  151:21  warning  use of `.unwrap_or_else(..)` to construct default value  clippy::unwrap_or_
else_default (clippy)

Links to the code:
https://searchfox.org/mozilla-central/rev/78a2c17cc80680a5a82446e4ce7c45a73b935383/toolkit/components/glean/api/src/ffi/event.rs#62
https://searchfox.org/mozilla-central/rev/78a2c17cc80680a5a82446e4ce7c45a73b935383/toolkit/components/glean/api/src/ffi/event.rs#151

To run clippy:

./mach lint -l clippy toolkit/components/glean/api/src/ -W -v    

As the change is trivial, it is just to learn how to contribute to Firefox.

Tutorial to contribute:
https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
https://firefox-source-docs.mozilla.org/contributing/stack_quickref.html

Please don't ask for the bug to be assigned. It will be automatically assigned to the first patch.

Assignee: nobody → asthetiklee
Status: NEW → ASSIGNED

ignore my message :)

Backed out for causing build bustages with unwrap_or_else_default

Flags: needinfo?(asthetiklee)

i have quick question, how do I know the dependent rust version from source code?
The version I found from the file Cargo.toml(path: toolkit/components/glean/api/Cargo.toml) is edition = "2018",
but from the Failure Log , i can see that it is edition = "2021".
log:
[task 2024-01-13T10:50:23.737Z] 10:50:23 INFO - checking rustc version... 1.75.0

Flags: needinfo?(asthetiklee)
Attachment #9372690 - Attachment is obsolete: true
Attachment #9372698 - Attachment description: Bug 1868293 - Fix clippy warnings. r=Sylvestre → Bug 1868293 - Fix clippy warnings. r=sylvestre
Attachment #9372698 - Attachment description: Bug 1868293 - Fix clippy warnings. r=sylvestre → Bug 1868293 - Fix clippy warnings in glean-ffi r=sylvestre
Pushed by sledru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c8356d039b51 Fix clippy warnings in glean-ffi r=sylvestre

There is an r+ patch which didn't land and no activity in this bug for 2 weeks.
:asthetiklee, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit BugBot documentation.

Flags: needinfo?(sledru)
Flags: needinfo?(asthetiklee)
Attachment #9377235 - Attachment is obsolete: true

Contributor inactive, unassigning it

Assignee: asthetiklee → nobody
Status: ASSIGNED → NEW
Flags: needinfo?(sledru)
Flags: needinfo?(asthetiklee)
Assignee: nobody → tannal2409
Status: NEW → ASSIGNED
Pushed by sledru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4df6842cb470 Fix clippy warnings in glean-ffi r=sylvestre
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: